package com.jkdz.spyke.rs
{
	import com.jkgh.remedy.core.client.*;
	import flash.utils.ByteArray;
	import flash.net.Socket;

	public class SpykeFileSharerListenerProxy extends SpykeWidgetListenerProxy implements SpykeFileSharerListener
	{

		public function SpykeFileSharerListenerProxy(remoteeID:int, connection:RemedyClientServerConnection)
		{
			super(remoteeID, connection);
		}

		public function folderNameChanged(a:String):void
		{
			connection.performRun(remoteeID, function(connection:RemedyClientServerConnection):void {

				RemedyCodec.writeMethodID(connection.getSocket(), 38);
				RemedyStringClassManager.INSTANCE.writeWithGraph(a, connection, new Vector.<Object>());

			});
		}

		public function newFileOffered(a:FileInfo):void
		{
			connection.performRun(remoteeID, function(connection:RemedyClientServerConnection):void {

				RemedyCodec.writeMethodID(connection.getSocket(), 39);
				RemedyDOClassManager.INSTANCE.writeWithGraph(a, connection, new Vector.<Object>());

			});
		}

		public function fileUnOffered(a:String):void
		{
			connection.performRun(remoteeID, function(connection:RemedyClientServerConnection):void {

				RemedyCodec.writeMethodID(connection.getSocket(), 37);
				RemedyStringClassManager.INSTANCE.writeWithGraph(a, connection, new Vector.<Object>());

			});
		}
	}
}
